#define _CRT_SECURE_NO_WARNINGS

#include "Sort.h"
#include "Stack.h"

void testMergeSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,67,8,54,67,98,17,25,34,56,78,89,90,91,23,24,252,62,76,23,45,66,77,88,99,11,22,33,45,35,36,38,22,11,32,41,53,6,45,75,12,45 };
	int n = sizeof(a) / sizeof(a[0]);
	//MergeSort(a, n);
	MergeSortNonR(a, n);
}

void testQuickSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5,67,8,54,67,98,17,25,34,56,78,89,90,91,23,24,252,62,76,23,45,66,77,88,99,11,22,33,45,35,36,38 };
	int n = sizeof(a) / sizeof(a[0]);
	//QuickSort(a, 0, n - 1);
	QuickSortNonR(a, 0, n-1);
}
void testBubbleSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	int n = sizeof(a) / sizeof(a[0]);
	BubbleSort(a, n);
}
void testHeapSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	int n = sizeof(a) / sizeof(a[0]);
	HeapSort(a, n);
}
void testSelectSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	int n = sizeof(a) / sizeof(a[0]);
	SelectSort(a, n);
}
void testShellSort()
{
	int a[] = { 9,1,2,5,7,4,8,6,3,5 };
	int n = sizeof(a) / sizeof(a[0]);
	ShellSort(a, n);
}
void testInsertSort()
{
	int a[] = { 1,8,2,4,5,5,6,3,9 };
	int n = sizeof(a) / sizeof(a[0]);
	InsertSort(a,n);
}
int main()
{
	//testInsertSort();
	//testShellSort();
	//testSelectSort();
	//testHeapSort();
	//testBubbleSort();
	//testQuickSort();
	testMergeSort();
	return 0;
}
